<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8" isELIgnored="false"%>
<%@ include file="/WEB-INF/views/shared/taglib.jsp"%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no, minimal-ui"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<meta name="format-detection" content="telephone=no, email=no"/>
<meta charset="UTF-8">
<title>商品详情</title>
<link rel="stylesheet" type="text/css" href="/apollo/css/aui/core.css">
<link rel="stylesheet" type="text/css" href="/apollo/css/aui/icon.css">
<link rel="stylesheet" type="text/css" href="/apollo/css/aui/home.css">

<link rel="icon" type="image/x-icon" href="favicon.ico">
<link href="iTunesArtwork@2x.png" sizes="114x114" rel="apple-touch-icon-precomposed">
<style>
body{
background:white;
}
.m-button {
	padding: 0 0.24rem;
}
.btn-block {
	text-align: center;
	position: relative;
	border: none;
	pointer-events: auto;
	width: 100%;
	display: block;
	font-size: 1rem;
	height: 2.5rem;
	line-height: 2.5rem;
	margin-top: 0.5rem;
	border-radius: 3px;
}
.btn-primary {
	background-color: #04BE02;
	color: #FFF;
}
.btn-warning {
	background-color: #FFB400;
	color: #FFF;
}
.mask-black {
	background-color: rgba(0, 0, 0, 0.6);
	position: fixed;
	bottom: 0;
	right: 0;
	left: 0;
	top: 0;
	display: -webkit-box;
	display: -webkit-flex;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-pack: center;
	-webkit-justify-content: center;
	-ms-flex-pack: center;
	justify-content: center;
	-webkit-box-align: center;
	-webkit-align-items: center;
	-ms-flex-align: center;
	align-items: center;
	z-index:999;
}
.m-actionsheet {
	text-align: center;
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	z-index: 1000;
	background-color: #EFEFF4;
	-webkit-transform: translate(0, 100%);
	transform: translate(0, 100%);
 -webkit-transition: -webkit-transform .3s;
 transition: -webkit-transform .3s;
 transition: transform .3s;
 transition: transform .3s, -webkit-transform .3s;
}
.actionsheet-toggle {
	-webkit-transform: translate(0, 0);
	transform: translate(0, 0);
}
.actionsheet-item {
	display: block;
	position: relative;
	font-size: 0.8rem;
	color: #555;
	height: 2rem;
	line-height: 2rem;
	background-color: #FFF;
}
.actionsheet-item:after {
	content: '';
	position: absolute;
	z-index: 2;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 1px;
	border-bottom: 1px solid #D9D9D9;
	-webkit-transform: scaleY(0.5);
	transform: scaleY(0.5);
	-webkit-transform-origin: 0 100%;
	transform-origin: 0 100%;
}
.actionsheet-action {
	display: block;
 margin-top: .15rem;
	font-size: 0.8rem;
	color: #555;
	height:2rem;
	line-height: 2rem;
	background-color: #FFF;
	position:absolute;
	top:10px;
	right:0;
	padding:0 2px;
}
.lbxx {
	position:relative;
	display:-webkit-box;
	display:-webkit-flex;
	display:flex;
}
.lbxx li {
	float:left;
	margin:5px;
	line-height:20px;
}
.lbxx_action {
	border:1px solid #f00;
}
.lbxx li a {
	display:inline-block;
	padding:3px 6px;
	text-align:center;
	border:1px solid #dcdcdc;
}
.aui-address-l {
	padding: 14px 0 6px 6px;
	position: relative;
	display: -webkit-box;
	display: -webkit-flex;
	display: flex;
	-webkit-box-align: center;
	-webkit-align-items: center;
	align-items: center;
	-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
	color: inherit;
}

/*对齐,显示，隐藏等*/
.aui-pull-right {
	float: right !important;
}
.aui-pull-left {
	float: left !important;
}
.aui-hide {
	display: none !important;
}
.aui-show {
	display: block !important;
}
.aui-invisible {
	visibility: hidden;
}
.aui-inline {
	display: inline-block;
	vertical-align: top;
}
.aui-mask {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    z-index: 8;
    visibility: hidden;
    -webkit-transition: opacity .3s,-webkit-transform .3s;
    transition: opacity .3s,transform .3s;
}
.aui-mask.aui-mask-in {
	visibility: visible;
  	opacity: 1;
}
.aui-mask.aui-mask-out {
	opacity: 0;
}
img.aui-img-round {
	border-radius: 50%;
}

/*折叠菜单*/
.aui-collapse-header.aui-active {
    background: #ececec;
}
.aui-collapse .aui-list-item:active{
    background: #ececec;
}
.aui-collapse-content {
    display: none;
}
.aui-collapse-content .aui-list-item:last-child {
    border-bottom: 0;
}
@media screen and (-webkit-min-device-pixel-ratio:1.5) {
    .aui-collapse-content .aui-list-item:last-child {
        background-position: bottom;
    }
    .aui-list.aui-collapse.aui-list-noborder,
    .aui-list.aui-collapse.aui-list-noborder .aui-collapse-content:last-child .aui-list-item:last-child {
        border: none;
        background-size: 100% 1px;
        background-repeat: no-repeat;
        background-position: 0 bottom;
        background-image: linear-gradient(0,#dddddd,#dddddd 50%,transparent 50%);
        background-image: -webkit-linear-gradient(90deg,#dddddd,#dddddd 50%,transparent 50%);
    }
    .aui-list.aui-collapse.aui-list-noborder,
    .aui-list.aui-collapse.aui-list-noborder .aui-collapse-item:last-child .aui-list-item:last-child {
        border: none;
        background-size: 100% 0;
        background-image: none;
    }
    .aui-list.aui-collapse.aui-list-noborder .aui-collapse-item:last-child .aui-list-item.aui-collapse-header,
    .aui-list.aui-collapse.aui-list-noborder .aui-collapse-content .aui-list-item:last-child  {
        border: none;
        background-size: 100% 0;
        background-image: none;
    }
}
.aui-collapse-header.aui-active .aui-collapse-arrow {
    display: block;
    transform: rotate(180deg);
    -webkit-transform: rotate(180deg);
}

.aui-ellipsis-1 {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}
.aui-ellipsis {
	display: -webkit-box;
	overflow: hidden;
	text-overflow: ellipsis;
	word-wrap: break-word;
	word-break: break-all;
	white-space: normal !important;
	-webkit-line-clamp: 1;
	-webkit-box-orient: vertical;
}
.aui-ellipsis-2 {
	display: -webkit-box;
	overflow: hidden;
	text-overflow: ellipsis;
	word-wrap: break-word;
	word-break: break-all;
	white-space: normal !important;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}
 /*栅格类*/
.aui-row {
	overflow: hidden;
	margin: 0;
}
.aui-row-padded {
	margin-left: -0.125rem;
	margin-right: -0.125rem;
}
.aui-row-padded [class*=aui-col-xs-] {
	padding: 0.125rem;
}
.aui-col-xs-1,.aui-col-xs-2,.aui-col-xs-3,.aui-col-xs-4,.aui-col-xs-5,.aui-col-xs-6,.aui-col-xs-7,.aui-col-xs-8,.aui-col-xs-9,.aui-col-xs-10,.aui-col-xs-11,.aui-col-5 {
	position: relative;
	float: left;
}
.aui-col-xs-12 {
	width: 100%;
	position: relative;
}
.aui-col-xs-11 {
	width: 91.66666667%;
}
.aui-col-xs-10 {
	width: 83.33333333%;
}
.aui-col-xs-9 {
	width: 75%;
}
.aui-col-xs-8 {
	width: 66.66666667%;
}
.aui-col-xs-7 {
	width: 58.33333333%;
}
.aui-col-xs-6 {
	width: 50%;
}
.aui-col-xs-5 {
	width: 41.66666667%;
}
.aui-col-xs-4 {
	width: 33.33333333%;
}
.aui-col-xs-3 {
	width: 25%;
}
.aui-col-xs-2 {
	width: 16.66666667%;
}
.aui-col-xs-1 {
	width: 8.33333333%;
}
.aui-col-5 {
	width: 20%;
}
.collocation{
	display:none;
}
.num{
	justify-content: center;
    align-items: center;
    color: #646464;
    font-weight: bold;
    text-align: center;
    }
 /*toast*/
.aui-toast {
	background: rgba(0, 0, 0, 0.7);
	text-align: center;
	border-radius: 0.25rem;
	color: #ffffff;
	position: fixed;
	z-index: 3;
	top: 45%;
	left: 50%;
	width: 7.5em;
	min-height: 6em;
	margin-left: -3.75em;
	margin-top: -4rem;
	display: none;
}
.aui-toast .aui-iconfont {
	margin-top: 0.2rem;
	display: block;
	font-size: 2.6rem;
}
.aui-toast-content {
  margin: 0 0 0.75rem;
}
.aui-toast-loading {
    background-color: #ffffff;
    border-radius: 100%;
    margin: 0.75rem 0;
    -webkit-animation-fill-mode: both;
        	animation-fill-mode: both;
    border: 2px solid #ffffff;
    border-bottom-color: transparent;
    height: 2.25rem;
    width: 2.25rem;
    background: transparent !important;
    display: inline-block;
    -webkit-animation: rotate 1s 0s linear infinite;
        	animation: rotate 1s 0s linear infinite;
}
@font-face {
	font-family: "aui_iconfont";
	src: url('aui-iconfont.ttf') format('truetype');
}
.aui-iconfont {
	position: relative;
	font-family:"aui_iconfont" !important;
	font-size: 0.7rem;
	font-style:normal;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
.aui-icon-laud:before { content: "\e64b"; }
</style>
</head>
<body>
<header class="aui-header-default aui-header-fixed aui-header-bg"> 
		<a href="javascript:history.back(-1)" class="aui-header-item"> <i class="aui-icon aui-icon-back-white"></i> </a>
	  <div class="aui-header-center aui-header-center-clear">
	    <div class="aui-header-center-logo">
	      <div id="scrollSearchPro"> <span class="current">商品详情</span>  </div>
	    </div>
	  </div>
	  <a href="javascript:;" class="aui-header-item-icon select xx9"  style="min-width:0;" data-ydui-actionsheet="{target:'#aa1',closeElement:'#cancel'}">
	   <img src="/apollo/images/ad/xx1.png" width="22" height="22">
	  </a> 
</header>
<div class="aui-banner-content aui-fixed-top" data-aui-slider>
  <div class="aui-banner-wrapper">
   <c:forEach var="picture" items="${cargo.pictures}" >
    <div class="aui-banner-wrapper-item"> 
    	<a href="#">
    		<c:if test="${picture.fileId!=null }">
				<%-- <img name="pictureLoad" data-url="${tfile:getImageUrl(picture.fileId)}" style="width:375px;height:375px"> --%>
				<img name="pictureLoad" data-url="${tfile:getImageUrlStyle(cargo.fileId,'image/resize,w_375')}"  style="width:375px;height:375px" alt="">
			</c:if>
			<c:if test="${picture.fileId==null }">
				<img src="" style="width:375px;height:375px;text-align:center" alt="暂无图片">
			</c:if>		
    	</a> 
    </div>
	</c:forEach>
  </div>
  <div class="aui-banner-pagination"></div>
</div>
<div class="aui-product-content">
  <div class="aui-real-price clearfix"> 
  	
	<c:if test="${cargo.minSale==cargo.maxSale}">
		<span> <i>￥</i>${cargo.minSale} </span>			
	</c:if>
	<c:if test="${cargo.minSale!=cargo.maxSale}">
		<span> <i>￥</i> ${cargo.minSale}~~${cargo.maxSale}  </span>
	</c:if>
   	
  </div>
  <div class="aui-product-title">
    <h2 style="margin-top:5px">${cargo.cargoName }</h2>
    <p> ${cargo.describes } </p>
    <span style="float:left;margin-bottom:5px">销量： ${cargo.salesVolume } </span>
    <span style="float:right;margin-bottom:5px"> 库存：${cargo.stockNum } </span>
  </div>

  <div class="aui-product-strip" > <img src="/apollo/images/bg/ssy.jpg" alt=""> </div>
  <div class="aui-product-coupon"> 
   <div class="aui-collapse-item">
        <li class="aui-list-item aui-collapse-header" tapmode>
            <div class="aui-list-item-inner" style="padding:8px">
                <div class="aui-list-item-title">规格列表：</div>
                <div class="aui-list-item-right">
                    <i class="aui-iconfont aui-icon-down aui-collapse-arrow"></i>
                </div>
            </div>
        </li>
        <div class="aui-collapse-content">
        <li class="aui-list-item">
                <div class="aui-list-item-inner" style="text-align:center;padding:6px">
                    <div class="aui-col-xs-3 aui-list-item-title">规格</div>
                    <div class="aui-col-xs-3 aui-list-item-title">库存</div>
                    <div class="aui-col-xs-3 aui-list-item-title">价格</div>
                    <div class="aui-col-xs-3 aui-list-item-title">销量</div>
                    
                </div>
            </li>
        <c:forEach var="collocation" items="${collocations}" >
            <li class="aui-list-item" >
                <div class="aui-list-item-inner" style="text-align:center;white-space:normal;padding:4px">
                    <p class="aui-col-xs-3 aui-list-item-title aui-ellipsis" >${collocation.propertyNameOne }*${collocation.propertyNameTwo }</p>
                    <p class="aui-col-xs-3 aui-list-item-title">${collocation.stockNum }</p>
                    <p class="aui-col-xs-3 aui-list-item-title">${collocation.salePrice }</p>
                    <p class="aui-col-xs-3 aui-list-item-title">${collocation.saleNum+0 }</p>                    
                </div>
            </li>
        </c:forEach>   
        </div>
    </div>
    <div class="m-actionsheet" id="actionSheet">
      <div class="xx12">
      <t:form  action="/wechat/shop/save?shopId=${shop.shopId }" method="post" cssClass="form-horizontal"> 
      	<li class="aui-list-item" style="padding-top:0px;background-color:#f4f4f4;" id="collocationIndex">
                <div class="aui-list-item-inner" style="text-align:center;padding:1px;margin:5px">
                    <div class="aui-col-xs-5">规格</div>
                    <div class="aui-col-xs-2 ">价格</div>
                    <div class="aui-col-xs-5 ">数量</div>
                </div>
        </li>
        <li class="aui-list-item" style="padding-top:0px;" id="collocationIndex">
                <div class="aui-list-item-inner" style="text-align:center;padding:0px;margin:0px">
                    <div class="aui-col-xs-4" style="height:50px;display:table">
                    	<label style="display:table-cell;text-align:center;vertical-align:middle;">小计:<p style="color:#FE5E76" id="totalPrice"></p></label>
                    </div>
                    <div class="aui-col-xs-8" style="background-color:#FE5E76;height:50px;color:white;display:table">
                    	<label onclick="saveData()" style="display:table-cell;text-align:center;vertical-align:middle;">加入购物车</label>
                    </div>
                </div>
        </li>
        </t:form>
      </div>
    </div>
 </div>
  <div class="aui-dri"></div>
 
  <div class="aui-dri"></div>

  <div class="aui-dri"></div>
  <div class="aui-slide-box" style="overflow-y:none">
    <div class="aui-slide-list">
      <ul class="aui-slide-item-list">
      <c:forEach var="cargo" items="${cargos}" >
        <li class="aui-slide-item-item"> 
          <a href="/apollo/wechat/shop/product?cargoId=${cargo.cargoId }" class="v-link"> 
        	<c:if test="${cargo.fileId==null }">
				<img src="" style="height:80px;width:80px;text-align:center" alt="暂无图片">
			</c:if>	
			<c:if test="${cargo.fileId!=null }">
				<img name="pictureLoad" data-url="${tfile:getImageUrl(cargo.fileId)}" style="height:80px;width:80px"  alt="">
			</c:if>	
          	<p class="aui-slide-item-title aui-slide-item-f-els">${cargo.cargoName } ${cargo.cargoNo }</p>
          	<c:if test="${cargo.minSale==cargo.maxSale}">
          		<p class="aui-slide-item-info"> <span class="aui-slide-item-price">￥${cargo.minSale}</span></p>
			</c:if>
			<c:if test="${cargo.minSale!=cargo.maxSale}">
				<p class="aui-slide-item-info"> <span class="aui-slide-item-price">￥${cargo.minSale}~~${cargo.maxSale}</span></p>
			</c:if>
          </a> 
        </li>
       </c:forEach>
      </ul>
    </div>
  </div>
  <div class="aui-dri"></div>
 

</div>

<footer class="aui-footer-product">
  <div class="aui-footer-product-fixed">
    <div class="aui-footer-product-concern-cart"> 
    	<a href="tel://${shop.shopTel}"> <span class="aui-f-p-icon"><img src="/apollo/images/icon/icon-kf.png" alt=""></span> <span class="aui-f-p-focus-info">客服</span> </a>
    	<a  onclick="saveFavorite('${cargo.cargoId}')"> <span class="aui-f-p-icon"><img src="/apollo/images/icon/icon-sc.png" alt=""></span> <span class="aui-f-p-focus-info">收藏</span> </a> 
    	<a href="/apollo/wechat/shop/shop?shopId=${shop.shopId }&searchMark=${searchMark}"> <span class="aui-f-p-icon"><img src="/apollo/images/icon/icon-dp.png" alt=""></span> <span class="aui-f-p-focus-info">店铺</span> </a> 
    </div>
    <div class="aui-footer-product-action-list"> 
    	<a onclick="queryCollocations('${cargo.cargoId}','${cargo.shopId }')" data-ydui-actionsheet="{target:'#actionSheet',closeElement:'#cancel'}" class="yellow-color">加入购物车</a> 
    	<a href="/apollo/wechat/shop/car?shopId=${cargo.shopId}" class="red-color">立即下单</a> 
    </div>
  </div>
</footer>
<div class="xx10" id="aa1">
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td>
      	<a href=""><img src="/apollo/images/ad/xx2.png" width="114" height="114"><br>微信好友 </a>
      </td>
      <td>
      	<a href=""><img src="/apollo/images/ad/xx3.png" width="114" height="114"><br>微信朋友圈 </a>
      </td>
      <td>
      	<a href="javascript:;" data-ydui-actionsheet="{target:'#aa2',closeElement:'#cancel'}"><img src="/apollo/images/ad/xx4.png" width="114" height="114"><br>图文分享</a>
      </td>
    </tr>
    <tr>
      <td>
      	<a href=""><img src="/apollo/images/ad/xx5.png" width="114" height="114"><br>复制链接 </a>
      </td>
      <td></td>
      <td></td>
    </tr>
  </table>
</div>
<div class="collocation" >
 	<li  class="aui-list-item" style="padding-top:0px;">
       <div class="aui-list-item-inner" style="text-align:center;padding:1px;margin:5px">
           <div class="aui-col-xs-5 collocationId"></div>
           <div class="aui-col-xs-2 realPrice"></div>
           <input style="display:none" name="collocationIds" class="collocationIds" value="">
           <input style="display:none" name="buyNums" class="buyNums" value="">
            <div class="d4 aui-col-xs-5 collocationNum" >
            	
            	<div class="aui-col-xs-12" >
            		<a  href="javascript:;" onclick="minusNum(this)" class="minus aui-col-xs-3"></a> 
            		<label class="num aui-col-xs-6"  style="height:30px;width:50%">1</label> 
            		<a href="javascript:;" onclick="plusNum(this)" class="plus aui-col-xs-3"></a> 
            	</div>
            </div>
       </div>
    </li>
</div>
<div class="xx11" id="aa2"> <img src="/apollo/images/ad/xx6.jpg" width="193" height="191">
  <h3>提交成功</h3>
  <p>·商品二维码已保存到相册<br>·商品图片已保存到手机相册<br>·分享文案和链接已复制</p>
  <a href="">去朋友圈分享</a>
</div>
<script src="/apollo/js/aui/jquery.min.js"></script> 
<script src="/apollo/js/aui/aui.js"></script> 
<script src="/apollo/js/aui/api.js"></script> 
<script src="/apollo/js/aui/aui-down.js"></script> 
<script src="/apollo/js/aui/aui-car.js"></script> 
<script src="/apollo/js/aui/aui-collapse.js"></script>
<script type="text/javascript" src="/apollo/js/aui/aui-toast.js"></script> 

<script>

function saveFavorite(cargoId){
	
	var url =$.getVirtualPath()+"/wechat/favorite/save";
    $.ajax({
        type: 'post',
        dataType: "json",
        url: url,
        data:"cargoId="+cargoId,
        async: false,
        success: function (result) {
        	if(result!=null){
        		
        		if(result.resultType=="success"){
        			showDefault("success");
        		}else{
        			showDefault("error");
        		}	
    		}
       	}
    });
}

function saveData(lBtn){
	
	var parm=$("form:first").serialize();
	var url =$.getVirtualPath()+"/wechat/shop/save";
    $.ajax({
        type: 'post',
        dataType: "json",
        url: url,
        data: parm,
        async: false,
        success: function (result) {
        	if(result!=null){
        		
        		if(result.resultType=="success"){
        			showDefault("success");
        			console.log(result)
        			
       		      	var $myAs = $('.mask-black');
       				var actionSheet=$("#actionSheet");
            		$myAs.toggle();
       				actionSheet.toggle(); 
        		}        	
    		}
       	}
    });
}


var toast = new auiToast();
function showDefault(type){
    switch (type) {
    case "success":
        toast.success({
            title:"收藏成功",
            duration:2000
        });
        break;
        case "error":
            toast.fail({
                title:"收藏失败",
                duration:2000
            });
            break;
        case "custom":
            toast.custom({
                title:"提交成功",
                html:'<i class="aui-iconfont aui-icon-laud"></i>',
                duration:2000
            });
            break;
      
        default:
            
            break;
    }
}

function totalPrice(){
	var totalPrice=0;
	$(".num").each(function(){
		var num=$(this).text();
		var price=$(this).parent().parent().siblings(".realPrice").text();
		//$(this).parent().parent().siblings(".collocationIds").val(num);
		$(this).parent().parent().siblings(".buyNums").val(num)
		totalPrice=totalPrice+num*price;
		
	})
	totalPrice=totalPrice.toFixed(2);
	$("#totalPrice").text(totalPrice);
}


window.onload=function (){
	pictureLoad();
}
function pictureLoad(){
	$("img[name='pictureLoad']").each(function(){
	    var url=$(this).data("url");
	    $(this).attr("src",url);
	});
}

function queryCollocations(cargoId,shopId){
	var collocation;
	  
	var url =$.getVirtualPath()+"/wechat/shop/getCargoInfo";
    $.ajax({
        type: 'get',
        dataType: "json",
        url: url,
        data: "cargoId="+cargoId+"&shopId="+shopId,
        async: false,
        success: function (result) {
        	if(result!=null){
        		collocation=result.data;
        		collocation.forEach(function(element,index){
        			addCollocation(element);
        			console.log("胡茂树")
        		})
        		
    		}
       	}
    });
    totalPrice();
}


function addCollocation(element){
	
	var collocation=$(".collocation").clone();
	collocation.removeClass("collocation");
	$("#actionSheet").find(".xx12").find(".collocationOld").remove();
	collocation.addClass("collocationOld");
	collocation.find(".aui-list-item").find(".aui-list-item-inner").find(".collocationId").attr("name","collocationId");
	if($.isNull(element.propertyNameTwo)){
		element.propertyNameTwo="";
	}
	if($.isNull(element.propertyNameOne)){
		element.propertyNameOne="";
	}
	
	collocation.find(".aui-list-item").find(".aui-list-item-inner").find(".collocationId").text(element.propertyNameOne+"*"+element.propertyNameTwo);
	collocation.find(".aui-list-item").find(".aui-list-item-inner").find(".realPrice").text(element.salePrice);
	$("#collocationIndex").after(collocation);
	
	var $myAs = $('.mask-black');
	var actionSheet=$("#actionSheet");
	
    $myAs.show();
	actionSheet.show();
}



</script>
<script>
apiready = function () {
    api.parseTapmode();
}
var collapse = new auiCollapse({
    autoHide:false //是否自动隐藏已经展开的容器
});
</script> 
<script type="text/javascript">
        $(function () {
            //绑定滚动条事件
            //绑定滚动条事件
            $(window).bind("scroll", function () {
                var sTop = $(window).scrollTop();
                var sTop = parseInt(sTop);
                if (sTop >= 100) {
                    if (!$("#scrollSearchPro").is(":visible")) {
                        try {
                            $("#scrollSearchPro").slideDown();
                        } catch (e) {
                            $("#scrollSearchPro").show();
                        }
                    }
                }
                else {
                    if ($("#scrollSearchPro").is(":visible")) {
                        try {
                            $("#scrollSearchPro").slideUp();
                        } catch (e) {
                            $("#scrollSearchPro").hide();
                        }
                    }
                }
            });
        })
	</script> 
	<script>
	
	function minusNum(element){

		var t = $(element).parent().find('.num');
		t.text(parseInt(t.text()) - 1);
		if (t.text() <= 1) {
			t.text(1);
		}
		totalPrice();
	}

	function plusNum(element){
		
		var t = $(element).parent().find('.num');
		t.text(parseInt(t.text()) + 1);
		if (t.text() <= 1) {
			t.text(1);
		}
		totalPrice();
	}
	        /**
	         * Javascript API调用ActionSheet
	         */
	        !function ($) {
	            var $myAs = $('#J_ActionSheet');
	
	            $('#J_ShowActionSheet').on('click', function () {
	                $myAs.actionSheet('open');
	            });
	
	            $('#J_Cancel').on('click', function () {
	                $myAs.actionSheet('close');
	            });
	
	        }(jQuery);
	</script>
</body>
</html>
<%@ include file="/WEB-INF/views/shared/scripts/jquery.jsp" %>
<%@ include file="/WEB-INF/views/shared/base/scripts/jqueryui.jsp"%>